// handle ajax links
jQuery('.headerdropdown').on('click', ' li > a.ajaxify', function (e) {
e.preventDefault();
App.scrollTop();

var url = $(this).attr("href");
var pageContent = $('.page-content');
var pageContentBody = $('.page-content .page-content-body');

//App.blockUI(pageContent, false);

$.ajax({
	type: "GET",
	cache: false,
	url: url,
	dataType: "html",
	success: function (res) {
		App.unblockUI(pageContent);
		pageContentBody.html(res);
                App.fixContentHeight(); // fix content height
                App.initAjax(); // initialize core stuff
            },
            error: function (xhr, ajaxOptions, thrownError) {
            	pageContentBody.html('<h4>无法访问指定页面' + url + '.</h4>');
            	App.unblockUI(pageContent);
            },
            async: false
        });
});


var app = angular.module("App", []);